/**
 * Created by lvlq on 16/2/27.
 */
var wsdl = Util("Func.wsdl");
var Get_AcCodeInterface = function (req, res) {
    var ip = req.body.ip;
    var acCode = req.body.acCode;
    var Wsdl = M("index.wsdl");
    wsdl(ip, acCode).then(function (data) {
        Wsdl.create({
            input: JSON.stringify({
                ip: ip,
                acCode: acCode
            }),
            output: JSON.stringify(data)
        });
        res.json(data);
    }).catch(function (err) {
        Wsdl.create({
            input: JSON.stringify({
                ip: ip,
                acCode: acCode
            }),
            output: err.message
        });
        res.json({err: err.message});
    });
};

module.exports = {
    Get_AcCodeInterface: Get_AcCodeInterface
};